﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PresentationLayerMVC.Controllers.RoomController+RoomSearchModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Search
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <% using (Html.BeginForm()) {%>
        
        <fieldset>
            <legend>Search Room</legend>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.RoomNumber) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RoomNumber) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RoomStatusID) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(m => m.RoomStatusID, (SelectList)ViewData["RoomStatusList"], "-- Select --")%>
            </div>
            
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RoomTypeID) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(m => m.RoomTypeID, (SelectList)ViewData["RoomTypeList"], "--- Select ---")%>
            </div>
            
            <p>
                <input type="submit" value="Search" name="btnSearch" />
            </p>
        </fieldset>

        <div id="SearchResult">
            <% if (Model.Result != null && Model.Result.Count() > 0)
               {
                   Html.RenderPartial("SearchResult", Model.Result);
               }  %>
        </div>

    <% } %>

</asp:Content>
